<?php
	session_start();
	$username = $_POST["uName"];
	$password = $_POST["pass"];

	include 'dbconnect.php';
	$strSQL = "SELECT * FROM dk_user WHERE user='".$username."' AND pass='".$password."'";
	
	//echo $strSQL;
	
	$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
	$data = mysql_fetch_array($objQuery);
	if ($data)
	{
		echo "LOGIN SUCCESSFUL:".$data['user'];
		$_SESSION['user'] = $data['user'];
		echo "<meta HTTP-EQUIV='refresh' content='3;url=index.php'>";
	} else {
		echo "USERNAME OR PASSWORD INCORECT";
		echo "<meta HTTP-EQUIV='refresh' content='3;url=login.html'>";
	}
?>